package fuxi01_lombok_override_array_20250707.array_test_jiudian;

import java.util.Scanner;

public class HotalSystem {
//    定义数组, 共享需要使用 static
   static String[][] roomInfo={
        {"空","王瑞","齐政越"},
        {"张国伟","空"},
        {"汤姆克鲁斯","姚明","空","成龙"},
        {"空","章若楠","王俊凯"}
};

    public static void main(String[] args) {
        System.out.println("欢迎使用酒店管理系统，请输入业务需求：");
        System.out.println("按1：酒店入住");
        System.out.println("按2：房间查询");
        System.out.println("按3：换房");
        System.out.println("按4：退房");
        System.out.println("按5：退出系统");
        Scanner scanner= new Scanner(System.in);
        int scanner_jd= scanner.nextInt();

        while (true){
            switch (scanner_jd){
                case 1:

                case 2:
                    queryRoomInfo(roomInfo);
                    break;
                case 3:

                case 4:

                case 5:
                    System.exit(0);
            }
        }
    }

    //   定义方法：查询酒店入住情况
    public static void queryRoomInfo(String[][] roomInfo){
        for (int i=1; i<=roomInfo.length; i++){
            for(int j=1; j<=i+1; j++){
                System.out.println(roomInfo[i][j]);
            }
        }
    }
}
